package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/***
 * 房间实体类
 */
@TableName("t_room")
public class RoomBean {
    /**
     * 编号
     */
    @TableId(value = "pk_roomId", type = IdType.AUTO)
    private Integer id;
    /**
     * 地址
     */
    @TableField("r_address")
    private String address;
    /**
     * 可容纳人数
     */
    @TableField("r_content")
    private Integer content;
    /**
     * 已住人数
     */
    @TableField(exist = false)
    private Integer inRoom;
    /**
     * 状态
     */
    @TableField("r_status")
    private String status = "正常";
    /**
     * 房间类型
     */
    @TableField("r_type")
    private String type;
    /**
     * 已住学生集合
     */
    @TableField(exist = false)
    private List<StudentBean> studentList;

    public RoomBean(String address, Integer content, String type) {
        this.address = address;
        this.content = content;
        this.type = type;
    }

    public RoomBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getContent() {
        return content;
    }

    public void setContent(Integer content) {
        this.content = content;
    }

    public Integer getInRoom() {
        return inRoom;
    }

    public void setInRoom(Integer inRoom) {
        this.inRoom = inRoom;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<StudentBean> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<StudentBean> studentList) {
        this.studentList = studentList;
    }

    @Override
    public String toString() {
        return "RoomBean{" +
                "id=" + id +
                ", address='" + address + '\'' +
                ", content=" + content +
                ", inRoom=" + inRoom +
                ", status='" + status + '\'' +
                ", type='" + type + '\'' +
                ", studentList=" + studentList +
                '}';
    }
}
